package com.lrkj.common.core.domain.entity;

import com.lrkj.common.annotation.Excel;
import com.lrkj.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 报修项目对象 tb_repair_project
 *
 * @author yajun_ren
 * @date 2022-04-22
 */
@Data
public class RepairProject extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private String id;

    /**
     * 父级ID
     */
    @Excel(name = "父级ID")
    private String parentId;

    /**
     * 项目名称
     */
    @Excel(name = "项目名称")
    private String projectName;

    /**
     * 标准工时
     */
    @Excel(name = "标准工时")
    private Long standardLaborTime;

    /**
     * 管理岗位
     */
    @Excel(name = "管理岗位")
    private String managerialPosition;

    /**
     * 执行岗位
     */
    @Excel(name = "执行岗位")
    private String executivePosition;

    /**
     * 允许抢单
     */
    @Excel(name = "允许抢单")
    private String grabSingle;

    /**
     * 维修指引
     */
    @Excel(name = "维修指引")
    private String maintenanceGuidelines;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private String status;

    /**
     * 祖级列表
     */
    @Excel(name = "祖级列表")
    private String ancestors;

    /**
     * 排序序号
     */
    @Excel(name = "排序序号")
    private Long orderNum;

    /**
     * 子列表
     */
    private List<RepairProject> children = new ArrayList<RepairProject>();

    //收费标准列表
    List<RepairFeeScale> repairFeeScales;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("parentId", getParentId())
                .append("projectName", getProjectName())
                .append("standardLaborTime", getStandardLaborTime())
                .append("managerialPosition", getManagerialPosition())
                .append("executivePosition", getExecutivePosition())
                .append("grabSingle", getGrabSingle())
                .append("maintenanceGuidelines", getMaintenanceGuidelines())
                .append("status", getStatus())
                .append("ancestors", getAncestors())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("orderNum", getOrderNum())
                .toString();
    }
}
